import fetch from 'common/src/utils/fetch';

/**
 * 查询申请辅修报名名单列表
 */
export function queryApplyMinorSignUpList(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/queryNameListByAdmin',
        method: 'POST',
        data
    });
}

/**
 * 录取学生
 */
export function matriculate(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/matriculateByAdmin',
        method: 'POST',
        data
    });
}

/**
 * 取消录取
 */
export function cancelMatriculate(data) {
    return fetch({
        url:
            '/api/cultureservice/applyMinorSignUpList/cancelMatriculateByAdmin',
        method: 'POST',
        data
    });
}

/**
 *  批量录取
 */
export function batchMatriculate(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/batchMatriculateByAdmin',
        method: 'POST',
        data
    });
}

/**
 *  导出学生报名名单信息
 */
export function exportStudentListByAdmin(params) {
    let url =
        '/api/cultureservice/minorProfessionRegistration/exportStudentApplyFinalList';
    let query = '?';
    for (let key in params) {
        query += key;
        query += '=';
        query += params[key];
        query += '&';
    }
    return url + query.substring(0, query.length - 1);
}
